<%@ page language="java" import="java.util.*,com.hs.core.utils.*,com.hs.chd.action.search.*" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head> 
<%@ include file="../../include.jsp"%> 
<script src='<%=basePath%>thirtpart/jquery/jquery.blockUI.js'></script> 
<script src='<%=basePath%>app/js/hs.search.js'></script> 

<style>.tac{text-align:center}</style>
<script>
     
    function submitForm(otherparams){   
    	var pstr = testSearch(otherparams,15); 
    	var searchstr = $("#searchform").serialize();
    	 
        $.ajax({   
            type:'post'  
            ,url:'<%=basePath%>search/dosearch.do'+pstr  
            ,data:searchstr,  
             //上边url和data合起来等价,url:'file.php?id='+postID+''                           
            contentType:'text/html;charset=utf-8'//编码格式   
            ,beforeSend:function(data){   
                $('#messagediv').html('loading...');
            }//发送请求前   
            ,success:function(data){   
                $('#searchresult').html(data);    
            }//请求成功后   
            ,error:function(data){   
                $('#messagediv').html('failed to load data.')   
            }//请求错误   
            ,complete:function(data){   
            	 

            }  
    
        });        
    }   
  
/**
检索
*/
function testSearch(otherParams,rowcount){
    
	var divid = "txt_";
	var paramStr = "?1=1&paramnames=";
	for(var i=1; i<=rowcount; i++){
		var divcur = divid + i + "_value";
		var curobj = ge(divcur);
		var curselStr = divid+i+"_sel";
		//字段值
		//var curvalueStr = divid+i+"_value";
		//逻辑运算符
		//var curlogicStr = divid+i+"_relation";
		//var curspecialStr = divid+i+"_special";
		
		if(curobj != undefined ){
 			if(curobj.value != "")
			{
				var curvalue = curobj.value;
				paramStr +=  curselStr +"$" ;
				//if(i !=1){
				//	var curlogic = ge(curlogicStr).value;
				//}else{
				//	var curlogic = 0 ;
				//}
				/**
				var cursel = ge(curselStr).value;
				var curspecial = ge(curspecialStr).value;
				if(onestr.indexOf("&")!=-1){
					paramStr = paramStr + "&";
				}*/
				//paramStr = onestr + curvalueStr+"="+curvalue+"&"+curlogicStr+"="+curlogic+"&"+curselStr+"="+cursel+"&"+curspecialStr+"="+curspecial;
			}
		}
		
	}  
	 
	paramStr +="&otherparams="+otherParams; 
	return paramStr;
	//alert(paramStr);
    //searchform.action="<%=basePath %>search/test.do"+paramStr;
   // searchform.submit();
}
</script>
</head>
<body>
<div class="cont">
	<!--检索--> 
        <div class="sear_tab">
            <div class="tab">
                <span class="curr">全库基本检索</span>
                <span>全库高级检索</span>
            </div>
            <form  id="searchform" name="searchform" method="post"> 
            <table width="300" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td>
                <label><input name="moden" id="moden" type="checkbox" value="1" checked/>中文期刊</label>
                <label><input name="modcn" id="modcn" type="checkbox" value="2" checked/>英文期刊</label>
                <label><input name="bookpaper" id="bookpaper" type="checkbox" value="3" checked/>古籍文献</label>
                    <select name="startyear" id="startyear">
                        <option value="">不限</option>
                        <%=SearchUtil.getYearSelectStr(false, 20) %>
                    </select> - 
                    <select name="endyear" id="endyear"> 
                          <option value="">不限</option>
                        <%=SearchUtil.getYearSelectStr(true, 20) %>
                    </select> 
                    <input type="text" style="width:300px;"/>
                    <input type="button" class="btn btn-primary" value="检索" />
                </td>
              </tr>
           </table>
         
           <table id="txt"  border="0" cellpadding="0" cellspacing="0">
            <input id="txt_i" value="1" type="hidden" name="txt_i">
            <input id="txt_c" value="15" type="hidden" name="txt_c">
            <tbody>
           
            <tr id="hidden_logical_txt" style="display:none">
                <td nowrap="true" style="width:60px;">
                    <select id="{key}_logical" name="{key}_logical" style="width:60px">
                        <option value="AND" selected="">并且</option>
                        <option value="OR">或者</option>
                    </select>
                </td> 
            </tr>
            <tr> 
                <td colspan=2  >
                	 <label><input name="moden_adv" id="moden_adv" type="checkbox" value="1" checked/>中文期刊</label>
                     <label><input name="modcn_adv" id="modcn_adv" type="checkbox" value="2" checked/>英文期刊</label>
                     <label><input name="bookpaper_adv" id="bookpaper_adv" type="checkbox" value="3" checked/>古籍文献</label>
                    <select name="startyear_adv" id="startyear_adv">
                        <option value="">不限</option>
                        <%=SearchUtil.getYearSelectStr(false, 20) %>
                    </select> - 
                    <select name="endyear_adv" id="endyear_adv"> 
                          <option value="">不限</option>
                        <%=SearchUtil.getYearSelectStr(true, 20) %>
                    </select> 
                </td>
              </tr>
            <tr id="txt_1" >
                 <td nowrap="true"  style="padding-left:100;width:70px"> 
                    <span class="btn_group">
                    	<input type="button" class="add" onclick="AddRowEx('txt','txt_i','txt_c');"/>
                    	<input type="button" class="selete" onclick="DeleteRow('txt','txt_i','txt_c');"/>
                    </span>
                </td>
               <td style="padding-left:0">
                    <select id="txt_1_sel" name="txt_1_sel"   style="width:105px">
                        <option value="SU" selected="">主题</option>
                        <option value="TI">篇名</option>
                        <option value="KY">关键词</option>
                        <option value="AU">作者</option>
                        <option value="DF">单位</option>
                        <option value="LY">刊名</option>
                        <option value="SN$=|?">ISSN</option>
                        <option value="CN">CN</option>
                        <option value="QI">期</option>
                        <option value="FU">基金</option>
                        <option value="AB">摘要</option>
                        <option value="FT">全文</option>
                        <option value="RF">参考文献</option>                       
                        <option value="CLC$=|?">中图分类号</option>
                    </select>
                    <input   value="" id="txt_1_value" name="txt_1_value" size="10" maxlength="120" type="text" onfocus=""   onpaste="return SignVal(this,&#39;value&#39;,event)" onkeyup="SignVal1(this)" style="width:600px;"/>
                     <select id="txt_1_special" name="txt_1_special" onchange="">
                        <option value="%">模糊</option>
                        <option value="=" selected="">精确</option>
                    </select>
                </td>  
            </tr> 
            <tr>
                <td class="searButt" align=right>
                	<input type="button" class="btn btn-primary" value="检索" />
                </td>
            </tr>
        </tbody>
      </table>
      </form>   
     </div>
    <!--/检索-->
    <!--检索结果-->
    <dl class="deta_sear_menu">
        <dt><span></span>年度</dt>
        <dd>
        	<ul>
            	<li><a href="#">2012</a><span>3625</span></li>
                <li><a href="#">2012</a><span>3625</span></li>
                <li><a href="#">2012</a><span>3625</span></li>
                <li><a href="#">2012</a><span>3625</span></li>
                <li><a href="#">2012</a><span>3625</span></li>
                <li><a href="#">2012</a><span>3625</span></li>
                <li><a href="#">2012</a><span>3625</span></li>
                <li><a href="#">2012</a><span>3625</span></li>
            </ul>
        </dd>
        <dt><span></span>期刊</dt>
        <dd>
            <ul>
            	<li><a href="#">中文期刊</a><span>3625</span></li>
                <li><a href="#">英文期刊</a><span>3625</span></li>
                <li><a href="#">2012</a><span>3625</span></li>
                <li><a href="#">2012</a><span>3625</span></li>
                <li><a href="#">2012</a><span>3625</span></li>
                <li><a href="#">2012</a><span>3625</span></li>
            </ul>
        </dd>
    </dl>
    <div class="iframeWrap">
        <iframe src="<%=basePath %>search/dosearch.do" frameborder="0" style="width:100%; height:99%" class="iframeStyle"></iframe>
    </div>
  <!--/检索结果-->
</div>
</body>
</html>

